from django.contrib import admin

from news.core.models.news import NewsItem  # 更新导入路径


# 自定义管理界面显示
class NewsItemAdmin(admin.ModelAdmin):
    list_display = ('news_item_title', 'create_time', 'status')
    search_fields = ('news_item_title', 'news_item_content')
    list_filter = ('status', 'news_item_cate')
    date_hierarchy = 'create_time'

# 注册模型
admin.site.register(NewsItem, NewsItemAdmin)
